package mini.statement;

import java.util.HashMap;
import java.util.LinkedList;

import mini.Proc;
import mini.expr.Element;
import mini.expr.Expr;


public class ReturnStatement extends Statement {

    private Expr expr;

    public ReturnStatement(Expr e) {
        expr = e;
    }

    public void eval(HashMap<String, Element> nametable, HashMap<String, Proc> functiontable, LinkedList var) throws ReturnException {
        throw new ReturnException(expr.eval(nametable, functiontable, var));
    }
}